package com.m7788.screen;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.webkit.WebView;

import com.m7788.view.UmengBaseActivity;

/**
 * Created by gxchen on 2018/7/9.
 */

public class BannerDetailActivity extends UmengBaseActivity {
    WebView mWebView;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_banner_detail);
        mWebView = findViewById(R.id.wb);
        Intent intent = getIntent();
        mWebView.loadUrl(intent.getStringExtra("url"));
    }

    public static void toBannerDetailActivity(Context context, String url,int requestCode){
        Intent intent = new Intent(context,BannerDetailActivity.class);
        intent.putExtra("url",url);
        ((Activity)context).startActivityForResult(intent,requestCode);
    }

    @Override
    public void onBackPressed() {
        setResult(RESULT_OK);
        finish();
    }
}
